use atk_relation_add_target() to add the targets, since it sets up weak
authorDamon Chaplin <damon@gnome.org>
Fri, 19 May 2006 14:04:47 +0000 (14:04 +0000)
committerDamon Chaplin <damon@src.gnome.org>
Fri, 19 May 2006 14:04:47 +0000 (14:04 +0000)
2006-05-19  Damon Chaplin  <damon@gnome.org>

* gtk/gtkfontsel.c (gtk_font_selection_init): use
atk_relation_add_target() to add the targets, since it sets up weak
references to avoid crashes. (#305530)

ChangeLog
ChangeLog.pre-2-10
gtk/gtkfontsel.c

index c3fdbf95be181f61ba3de1763de743176272e7db..cc681e4fa3935b6ebeacf4163839a20e3a35ed88 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-05-19  Damon Chaplin  <damon@gnome.org>
+
+       * gtk/gtkfontsel.c (gtk_font_selection_init): use
+       atk_relation_add_target() to add the targets, since it sets up weak
+       references to avoid crashes. (#305530)
+
 2006-05-18  Matthias Clasen  <mclasen@redhat.com>
 
        * gtk/gtkprintoperation.h: 
index c3fdbf95be181f61ba3de1763de743176272e7db..cc681e4fa3935b6ebeacf4163839a20e3a35ed88 100644 (file)
@@ -1,3 +1,9 @@
+2006-05-19  Damon Chaplin  <damon@gnome.org>
+
+       * gtk/gtkfontsel.c (gtk_font_selection_init): use
+       atk_relation_add_target() to add the targets, since it sets up weak
+       references to avoid crashes. (#305530)
+
 2006-05-18  Matthias Clasen  <mclasen@redhat.com>
 
        * gtk/gtkprintoperation.h: 
index ee88c292cba5f434a48efa35234b243593a63e83..1c2914793a434e74aa7e2f415ea932e0b2f6a624 100644 (file)
@@ -474,15 +474,13 @@ gtk_font_selection_init (GtkFontSelection *fontsel)
       AtkRelationSet *relation_set;
       AtkRelation *relation;
       AtkObject *obj_array[1];
-      GPtrArray *array;
 
       atk_label = gtk_widget_get_accessible (label);
       relation_set = atk_object_ref_relation_set (atk_obj);
       relation = atk_relation_set_get_relation_by_type (relation_set, ATK_RELATION_LABELLED_BY);
       if (relation)
         {
-          array = atk_relation_get_target (relation);
-          g_ptr_array_add (array, atk_label);
+          atk_relation_add_target (relation, atk_label);
         }
       else 
         {
@@ -496,8 +494,7 @@ gtk_font_selection_init (GtkFontSelection *fontsel)
       relation = atk_relation_set_get_relation_by_type (relation_set, ATK_RELATION_LABEL_FOR);
       if (relation)
         {
-          array = atk_relation_get_target (relation);
-          g_ptr_array_add (array, atk_obj);
+          atk_relation_add_target (relation, atk_obj);
         }
       else 
         {